package com.example.ExampleProject2;

import android.test.ActivityInstrumentationTestCase2;
import junit.framework.Assert;

/**
 * This is a simple framework for a test of an Application.  See
 * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
 * how to write and extend Application tests.
 * <p/>
 * To run this test, you can type:
 * adb shell am instrument -w \
 * -e class com.example.ExampleProject2.HelloAndroidActivityTest \
 * com.example.ExampleProject2.tests/android.test.InstrumentationTestRunner
 */
public class HelloAndroidActivityTest extends ActivityInstrumentationTestCase2<HelloAndroidActivity> {

    public HelloAndroidActivityTest() {
        super("com.example.ExampleProject2", HelloAndroidActivity.class);
    }

    public void testCreateTitle() throws Exception {
        HelloAndroidActivity activity = getActivity();
        String result = activity.createTitle();
        Assert.assertEquals(result, "UWAGA");
    }

    public void testCreateContent() throws Exception {
        int count = 1;
        HelloAndroidActivity activity = getActivity();
        String result = activity.createContent(count);
        Assert.assertEquals(result, "TO JEST POWIADOMIENIE NR: "+count);
    }
}
